﻿namespace SimpleWebServices.Web.Mvc
{
    using System;
    using System.Web;
    using System.Web.Mvc;

    public sealed class EmptyHtmlResult : ActionResult
    {
        public override void ExecuteResult(ControllerContext context)
        {
            if (null == context)
            {
                throw new ArgumentNullException("context");
            }

            HttpResponseBase response = context.HttpContext.Response;

            response.Cache.SetCacheability(HttpCacheability.Public);
            response.Cache.SetExpires(DateTimeFactory.UtcNow.AddDays(1));

            response.ContentType = "text/html";

            response.AppendHeader("Content-Language", "en");

            response.Write("<html><head><title></title></head><body></body></html>");
        }
    }
}